<include file="../Public:header" />
<script type="text/javascript" src="__PUBLIC__/js/jquery/ui/ui.slider.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/jquery/ui/ui.datepicker.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/jquery/ui/timepicker.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/jquery/ui/i18n/jquery-ui-i18n.js"></script>

<if condition="$act eq 'list'">
<script type="text/javascript">
	$(document).ready(function(){
		parent.showButton("");
		$('#date').datepicker({
	    	duration: '',
	    	dateFormat: 'yy-mm-dd',
	        showTime: false,
	        changeYear: true,
	        changeMonth: true,
	        constrainInput: true,
	        firstDay:0,
	        time24h: false
	     });
	});
    
	function doButton(btn){
		if(btn == 'import'){
			$.getJSON("__URL__/index_act/act/import",{},function(data){
				if(data.success == 1){
					alert("导入成功");
				}else{
					alert("导入失败");
				}
				window.location.reload();
			});
		}
	}
	function filter(){
		if($("#filter_key").val() == '请输入姓名') {
			$("#filter_key").val('');
		}
		$("#form").submit();
	}
	
</script>
        <div class="data-list">
	      <table class="list">
    		<form action="__URL__/index/" method="post" enctype="multipart/form-data" id="form">
	        <thead>
	          <tr class="filter">
	          	<td class="right">日期:　<input id="date" type="text" value="{$_mapx[filter_date]|default=''}" name="filter_date"></td>
	            <td class="right">关键字：<input style="width:300px;" type="text" id="filter_key" name="filter_key" value="{$_mapx['filter_key']|default="请输入姓名"}"></td>
	            <td align="left"><a class="button" onclick="filter();"><span>筛选</span></a></td>
	          </tr>
	        </thead>
	        </form>
	      </table>
	      
	      <table class="list">
	        <thead>
	          <tr style="background-color: rgb(244, 244, 248);">
	          	<td width="1" style="text-align: center;">
	          	  <input type="checkbox" onclick="$('input[name*=\\\'selected\\\']').attr('checked', this.checked);">
	          	</td>
	            <td class="left">姓名</td>
	            <td class="left">日期</td>
	            <td class="left">入园时间</td>
	            <td class="left">离园时间</td>
	            <td class="left">在园时长</td>
	            <td class="left">迟到/早退/请假</td>
<!--	            <td class="right">操作</td>-->
	          </tr>
	        </thead>
	        <tbody>
	        <volist name="list" id="val">
	          <tr>
	            <td style="text-align: center;">
	              <input type="checkbox" value="{$val.id}" name="selected[]">
	            </td>
	            <td class="left">{$val['uid']|getUserName}</td>
	            <td class="left">{$val['date']}</td>
	            <td class="left">{$val['time_begin']}</td>
	            <td class="left">{$val['time_end']}</td>
	            <td class="left">{$val['hours']}</td>
	            <td class="left">{$val['status']|default="正常"}</td> 
<!--	            <td class="right">-->
<!--	            	[ <a href="__URL__/index/act/view/id/{$val.uid}">查看</a> ]-->
<!--	                [ <a href="__URL__/index/act/edit/id/{$val.uid}">编辑</a> ]-->
<!--	            </td>-->
	          </tr>
	        </volist>
	        </tbody>
	      </table>
	       <p align=right>{$page}</p>
		</div>
<elseif condition="$act eq 'add' ||$act eq 'edit'"/>
	<include file="index_edit"/>
<elseif condition="$act eq 'view'"/>
	<include file="index_view"/>
</if>
<include file="../Public:footer"/>